// 其中是阅卷部分所需的函数
import request from '@/utils/request'

// 查询我的阅卷
// getMyMarking
// HttpServletRequest request, @RequestBody Exam exam, long current, long limit, int status
export const getMyMarking = (exam,current,limit,status)=>request({
    url:'/exam/exam/getMyMarking',
    method:'post',
    params:{current,limit,status},
    data:exam,
});

// 老师阅卷拿到试题，包括正确答案和学生答案，题目分数，学生得分
// markingStudentPaper
// String examId, String paperId, String studentId
export const markingStudentPaper = (examId,paperId,studentId)=>request({
    url:'/question/paper/markingStudentPaper',
    method:'post',
    params:{examId,paperId,studentId},
});

// 批阅一道试题
// markQuestion
// String paperQuestionId, String studentId, Float score
export const markQuestion = (paperQuestionId, studentId, score)=>request({
    url:'/paperConsumer/mark/markQuestion',
    method:'post',
    params:{paperQuestionId, studentId, score},
});

// 更新学生参加考试的所有关联信息教师端
// updateExamStudentConnectionFromTeacher
// @RequestBody StudentConnection studentConnection
export const updateExamStudentConnectionFromTeacher = (studentConnection)=>request({
    url:'/exam/exam/updateExamStudentConnectionFromTeacher',
    method:'post',
    data:studentConnection,
});

// 获取学生参加考试的所有关联信息，教师端
// getExamStudentConnectionTea
// String examId,String studentId
export const getExamStudentConnectionTea = (examId,studentId)=>request({
    url:'/exam/exam/getExamStudentConnectionTea',
    method:'get',
    params:{examId,studentId},
});